import Vue from 'vue'
import Router from 'vue-router'
// import Home from '@/components/ProductList'
import Cart from '@/components/Cart'
import Detail from '@/components/ShopDetail'

import Index from '@/components/Index'
import DetailApple from '@/pages/detail/apple'
import DetailBerry from '@/pages/detail/berry'
import DetailHotfruit from '@/pages/detail/hotfruit'
import DetailKiwi from '@/pages/detail/kiwi'
import DetailMelon from '@/pages/detail/melon'
import DetailPeach from '@/pages/detail/peach'

Vue.use(Router)

export default new Router({
  routes: [
    // {
    //   path: '/',
    //   name: 'Home',
    //   component: Home
    // },
    { path: '/cart',
      name:'cart',
      component: Cart
    },
    {
      path: '/shop/:id',
      name:'detail',
      component: Detail
    },
    {
      path: '/',
      name: 'Index',
      component: Index
    },
    {
      path: '/detail/apple',
      name: 'Apple',
      component: DetailApple
    },
    {
      path:'/detail/berry',
      component:DetailBerry
    },
    {
      path:'/detail/hotfruit',
      component:DetailHotfruit
    },
    {
      path:'/detail/kiwi',
      component:DetailKiwi
    },
    {
      path:'/detail/melon',
      component:DetailMelon
    },
    {
      path:'/detail/peach',
      component:DetailPeach
    }
  ]
})
